#! /bin/sh -vx
# $Id: expanded.test 804 2018-05-17 22:29:15Z karl $
# Public domain
# David Carlisle: version for \expanded based on existing test scripts
# by Peter Breitenlohner and Karl Berry.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_pdftex=$BinDir/pdftex$ExeExt

LC_ALL=C; export LC_ALL;  LANGUAGE=C; export LANGUAGE

TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF
TEXINPUTS="$srcdir/pdftexdir/tests;."; export TEXINPUTS

$_pdftex -ini -etex --interaction batchmode expanded.tex
sed -n -e 's/[\\]pdf/\\/g' -e '/START/,/END/p' expanded.log \
  >expanded_pdftex.log || exit 1

diff "$srcdir/pdftexdir/tests/expanded.txt" expanded_pdftex.log || exit 1

exit 0

